<!--
  ~ This program is part of the OpenLMIS logistics management information system platform software.
  ~ Copyright © 2013 VillageReach
  ~
  ~  This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  ~
  ~  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.
  ~  You should have received a copy of the GNU Affero General Public License along with this program.  If not, see http://www.gnu.org/licenses.  For additional information contact info@OpenLMIS.org.
  -->

<div class="table-container">
<div id="programAssociationTable" class="prog-role-grid">
<div class="fluid-grid">
<div class="row-fluid fluid-grid-header">
    <div class="span3">
        <div id="programHeader" class="fluid-grid-cell" openlmis-message="label.schedule"></div>
    </div>
    <div class="span3">
        <div id="categoryHeader" class="fluid-grid-cell" openlmis-message="label.price"></div>
    </div>

</div>

<div class="row-fluid" ng-repeat="priceSchedule in priceSchedules" tab-scroll>

    <div class="span3">
        <div class="fluid-grid-cell">{{priceSchedule.priceSchedule.code}}</div>
    </div>
    <div class="span2">
        <div class="span8 fluid-grid-cell">
            <div class="position-relative">
                <input type="text" id="price_shcedule" ng-model="priceSchedule.price"
                       class="right-justified"
                       name="price" numeric-validator="positiveInteger" maxlength="10"/>
              <span class="rnr-form-error" style="display:none;" id="addPrice"
                    openlmis-message="error.number.only"></span>
            </div>
        </div>
    </div>
</div>

    <div class="row-fluid add-program-schedule" tab-scroll ng-show="priceSchedules.length < 3">
        <div class="span3">
            <div class="span12 fluid-grid-cell">
                <div class="position-relative">
                    <select class="input-medium span12" ng-model="newPriceSchedule.priceSchedule.id">
                        <option openlmis-message="select.price.schedule.category"></option>
                        <option ng-repeat="categories in priceScheduleCategories"  value="{{ categories.id }}">{{categories.code}}</option>
                    </select>
              <span class="rnr-form-error" style="display:none;" id="addPrice"
                    openlmis-message="error.number.only"></span>
                </div>
            </div>
        </div>
        <div class="span2">
            <div class="span8 fluid-grid-cell">
                <div class="position-relative">
                    <input type="text" id="price_shcedule" ng-model="newPriceSchedule.price"
                           class="right-justified"
                           name="price" numeric-validator="positiveInteger" maxlength="10"/>
              <span class="rnr-form-error" style="display:none;" id="addPrice"
                    openlmis-message="error.number.only"></span>
                </div>
            </div>
        </div>

        <div class="span2 fluid-grid-cell">
            <input type="button" class="btn btn-primary btn-small pull-right"
                   id="priceScheduleAdd"
                   ng-click="addPriceSchedule()"
                   openlmis-message="button.add"/>
        </div>
</div >
</div>
</div>
</div>
